package testjava;

import java.io.IOException;
import java.io.OutputStream;

public class CountOutputStream extends OutputStream {
    int count = 0;

    @Override
    public void write(int b) throws IOException {
        count++;
    }

    public int getCount() {
        return count;
    }

    public void reset() {
        count = 0;
    }

}
